<template>
  <div id="app">
   <!-- https://element.eleme.cn/#/zh-CN/component/tabl -->
  <router-view></router-view>
  </div>
</template>

<script>

export default {
  name: 'App',
  mounted() {
    //监听页面刷新，保存数据到sessionStorage里面
    window.addEventListener('unload',this.saveState);

  },

  methods:{

    saveState(){

      sessionStorage.setItem('state',JSON.stringify(this.$store.state.user));

    }

  }
}
</script>

<style>

</style>
